<html>
  <head>
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
    />
    <meta charset="UTF-8" />
    <title>附件</title>
    <link rel="stylesheet" type="text/css" href="./styles/load_error.css" />
    <script src="./app.js"></script>
    <script>
      const shareUrl = `app://handler/system/share/system?type=file&url=${window.location.hash.slice(
        1
      )}`;

      function onShareFile() {
        window.location.href = shareUrl;
      }

      window.onload = function () {
        document.getElementById("open").style.backgroundColor =
          app.theme.primaryColor;

        app.setRightMenus({
          data: [
            {
              title: "icon,dotMore",
              style: {
                fontSize: 20,
              },
              children: [
                {
                  title: "其他应用打开",
                  url: shareUrl,
                },
              ],
            },
          ],
        });
      };
    </script>
  </head>
  <body>
    <div class="column content">
      <div class="column">
        <img class="icon" src="./images/unknown-file.png" />
        <div class="message">无法预览此文件</div>
      </div>
      <button id="open" class="open" onclick="onShareFile()">
        其他应用打开
      </button>
    </div>
  </body>
</html>
